﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
using System.Xml;

namespace XmlDSigEx
{
    class RsaKeyValueWriter
    {
        private RSA _key;

        public RsaKeyValueWriter(RSA key)
        {
            _key = key;
        }

        public void WriteXml(XmlWriter writer)
        {
            writer.WriteStartElement("KeyValue", XmlSigner.NS_XMLDSIG);
            writer.WriteRaw(_key.ToXmlString(false));
            writer.WriteEndElement();
        }
    }
}
